﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Configuration;

namespace AnaGiftedProject
{
    public partial class WebForm10 : Page
    {
        /*  protected SqlConnection ConnectToDatabase()
          {
              string CS = ConfigurationManager.ConnectionStrings["SqlServerCS"].ConnectionString;
              SqlConnection CN = new SqlConnection(CS);
              return CN;
          }*/

        protected void Page_Load(object sender, EventArgs e)
        {
           // dataBind();
          /*  SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM PERSONAlIMG", ConnectToDatabase());
            DataSet ds = new DataSet();
            da.Fill(ds, "PERSONAlIMG");
            GVPERSIMG1.DataSource = ds.Tables["PERSONAlIMG"];
            GVPERSIMG1.DataBind();
             SqlConnection conn = new SqlConnection("server=.\\sqlexpress;database=DatabaseGifted.mdf;integrated security=true");
            string sqlstr = null;
            SqlCommand cmd = new SqlCommand();
            SqlDataReader rdr = null;
            */
        }

        protected void Button1_Click1(object sender, EventArgs e)
        {
            //conn.Open();
            //string imagefolder = "PersImages";
            //string savepath;
            //string savefile;
            //if (FileUpload1.HasFile)
            //{
            //    savepath = Path.Combine(Request.PhysicalApplicationPath, PersImages);
            //    savefile = Path.Combine(savepath.FileUpload1.fileName);
            //    FileUpload1.SaveAs(savefile);
            //    SqlDataSource2.Insert();
            //    DataList1.DataBind();
            }

      /*  private void dataBind() 
        {
            GVPERSIMG1.DataSource = DA.GetAllPersImg();
            GVPERSIMG1.DataBind();
        }

        protected void GVPERSIMG1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GVPERSIMG1.PageIndex = e.NewPageIndex;
            dataBind();
        }

        protected void GVPERSIMG1_RowEditing(object sender, GridViewEditEventArgs e)
        {
            GVPERSIMG1.EditIndex = e.NewEditIndex;
        }

        protected void GVPERSIMG1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }*/
        }
    }
